<template>
  <div>
    <el-carousel height="500px">
      <el-carousel-item v-for="(item,index) in src" :key="index">
       <img :src="item" alt="" width="80%">
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script>
export default {
  name: "",
  data() {
    return {
      src: [],
    };
  },
  mounted() {
    this.$axios.post("/api/resources/carousel").then((res) => {
      // console.log(res.data.carousel);
      res.data.carousel.forEach((item) => {
        this.src.push("http://47.115.85.237:3000/" + item.imgPath);
      });

      // console.log(this.src);
    });
  },
  methods: {},
};
</script>

<style lang="scss" scoped></style>
